package com.hnhs.demo.service;

import com.hnhs.demo.dao.UserMapper;
import com.hnhs.demo.model.User;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService{
    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> findAll() {
        List<User> select = userMapper.findAll();
        return select;
    }

    @Override
    public List<User> select() {
        List<User> userList = userMapper.select();
        return userList;
    }

    @Override
    public Integer insert(User user) {
//        Integer insert =
        return userMapper.insert(user);
    }

    @Override
    public Integer update(User user) {

        return userMapper.update(user);
    }
}
